#! -*-coding:utf-8 -*-
from flask_sqlalchemy import SQLAlchemy
from flask_migrate import Migrate
from flask_session import Session
from flask_wtf.csrf import CSRFProtect

db = SQLAlchemy()
migrate = Migrate()
sess = Session()
csrf = CSRFProtect()


#加载第三方组件方法
def load_extions(app):
    db.init_app(app=app)
    migrate.init_app(app=app,db=db)
    sess.init_app(app=app)
    csrf.init_app(app=app)